package com.lyhlmj.oop_client.Style.Buttons.RegisterButton;

import com.lyhlmj.oop_client.Frames.LoginAndRegister.LoginFrame.LoginFrame;
import com.lyhlmj.oop_client.Style.Buttons.GeneralButton;

import java.awt.*;

public class BackButton extends GeneralButton {
    private Window owner;

    public BackButton(String str, Window owner) {
        super(str);
        this.owner = owner;
    }

    //  不注册直接返回登陆界面
    public void backLoginFrame() {
        owner.dispose();  //销毁注册框架
        LoginFrame.initial();  //返回五子棋登录框架
    }
}
